package FTPDown;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;


public class FTPClient {
   public static void main(String[] args) throws Exception{
	   Socket socket=new Socket("127.0.0.1", 5555);
	   InputStream nin=socket.getInputStream();
	   OutputStream fout=new FileOutputStream("FileText/14x.jpg");
	   byte[] buffer=new byte[256];
	   int len=0;
	   while((len=nin.read(buffer))!=-1){
		   fout.write(buffer,0,len);
		   
	   }
	   nin.close();
	   fout.close();
	   //socket.close();
   }
}
